﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;

namespace Babelfish.HTML
{
    /// <summary>
    /// 
    /// </summary>
    public class HTMLDocument : HTMLNode, INodeDocument
    {
        private HtmlAgilityPack.HtmlDocument Document { get; set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="HTMLDocument"/> class.
        /// </summary>
        /// <param name="markup">The HTML markup.</param>
        public HTMLDocument(string markup)
            : this(markup, false, false)
        {
        }



        /// <summary>
        /// Initializes a new instance of the <see cref="HTMLDocument"/> class.
        /// </summary>
        /// <param name="markup">The HTML markup.</param>
        /// <param name="parseCss">if set to <c>true</c> [parse CSS].</param>
        /// <param name="parseJavascript">if set to <c>true</c> [parse javascript].</param>
        public HTMLDocument(string markup, bool parseCss, bool parseJavascript)
        {
            Document = new HtmlAgilityPack.HtmlDocument();
            Document.LoadHtml(markup);
            Node = Document.DocumentNode;
            ParseCss = parseCss;
            ParseJavascript = parseJavascript;
        }

    }
}
